﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class set : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string sql = "";
       if (Request["id"]!=null && Request["id"].ToString().Trim() != ""
                && Request["tablename"] != null && Request["tablename"].ToString().Trim() != ""
                && Request["colname"] != null && Request["colname"].ToString().Trim() != "")
        {
            string value = "";
            if (Request["value"] != null && Request["colname"].ToString().Trim() != "")
            {
                value = Request["value"];
            }
            
            sql = "update " + Request["tablename"].ToString().Trim() + " set " + Request["colname"].ToString().Trim() + "='" + value + "' where id=" + Request["id"].ToString().Trim();
            new Class1().hsgexucute(sql);
            
        }
        else
        {
            
        }
       Response.Redirect(Request.UrlReferrer.ToString().Trim());
    }
}
